package net.gxnun.xiaoyuan.core.utils;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class EncryptUtils {
    
    public static String make(String sourseStr,String encryptType){
        try {
            MessageDigest md = MessageDigest.getInstance(encryptType);
            md.update(sourseStr.getBytes());
            String target = new BigInteger(1, md.digest()).toString(16);
            return target;
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        return null;
    }
    
}
